<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>我的电商系统</title>
	<base href="__ROOT__/" />
	<link rel="stylesheet" type="text/css" href="Public/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="Public/css/bootstrap-theme.min.css">
	 <link rel="stylesheet" type="text/css" href="Public/css/front.css">
</head>
<body>
	<div class="container lists">
<!--head-->	
	<include file="./Application/Home/View/head.php" />
<!--banner-->
		<div class="row">
			<div class="col-md-3" id="lists">
				<div class="list-group">
					  <a href="#" class="list-group-item  first"><i class="glyphicon glyphicon-align-justify"></i>
					    <?php echo $parent_catalog['name'] ?>
					  </a>
					  <?php foreach ($brother_catalog as $c) {
					  ?>
					  	 <a href="<?php echo U('home/prodect/lists/catalog_id/'.$c['id']) ?>" class="list-group-item <?php if($current_catalog['id']==$c['id']) { ?>
					  	 	active
					  	 <?php 
					  	 }?>"><?php echo $c['name'] ?></a>
					<?php
					  } ?>
				</div>
			</div>
			<div class="col-md-9">
				<table id="table">
					<tr>
						<td class="lab">品牌</td>
						<td class="cont"><?php foreach ($brand as $b) {
							?>
							<a href="<?php echo U().'/catalog_id/'.$current_catalog['id'].'?brand='.$b['id'] ?>"><?=$b['name']; ?>
							<?php 
						} ?></a></td>
					</tr>
					<tr>
						<td class="lab">单反级别</td>
						<td class="cont">入门级 中级 高级</td>
					</tr>
					<tr>
						<td class="lab">屏幕尺寸</td>
						<td class="cont">3英寸 3.2英寸</td>
					</tr>
					<tr>
						<td class="lab">价格</td>
						<td class="cont">360以下元 1360-2720元 2720-4080元 6800以上元</td>
					</tr>
				</table>
				<br/>
				<table id="table2">
					<tr>
						<td class="nav">默认</td>
						<td class="nav">销量</td>
						<td class="nav">评价</td>
						<td class="nav">评论</td>
						<td class="nav">新品</td>
						<td id="block"></td>
					</tr>
				</table>
				<br/>
				<div class="row">
					<?php foreach ($prodect as $p) {
						?>
						<div class="item col-md-3 clearfix">
						<img src="__ROOT__<?php echo $p['img'] ?>" class="image">
							<ul>
							<?php 					
							$imgs=M('prodect_img')->where('prodect_id='.$p['id'])->limit(4)->select();
								
							foreach ($imgs as $i) {
							 ?>
								 <li class="clearfix"><img src="__ROOT__<?php echo $i['url'] ?>"  ></li>
							<?php
							 } ?>
							</ul>
							 <h5><a  href="<?php echo U('home/prodect/detail/'.$p['id']);?>"><?php echo $p['title'];?></a></h5>
							<p>￥<?php echo $p['price'];?></p>
							<a href="<?php echo U('home/prodect/detail/id/'.$p['id']);?>" class="btn btn-danger">立即购买</a>
						</div> 
					<?php
						} 
					?>
				</div>
			</div>	
		</div>
	</div>
</body>
</html>	
<script type="text/javascript" src="Public/js/jquery.min.js"></script>
	<script type="text/javascript">
		 $(window).load(function(){
	    	$('.lists .item ul li').mouseover(function(){	
				$(this).parents('.lists .item').find('ul li').removeClass("hover");
	    		$(this).addClass('hover');
	    		var src=$(this).find('img').attr('src');
	    		$(this).parents('.lists .item').find('.image').attr('src',src);	
	    	});
	    });	
	</script>

	

